<div class="estacoes index">
	<h2>Estações</h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('id'); ?></th>
			<th><?php echo $this->Paginator->sort('nome'); ?></th>
			<th><?php echo $this->Paginator->sort('nome_arquivo'); ?></th>
			<th><?php echo $this->Paginator->sort('latitude'); ?></th>
			<th><?php echo $this->Paginator->sort('longitude'); ?></th>
			<th><?php echo $this->Paginator->sort('tipo'); ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($estacoes as $estacao): ?>
	<tr>
		<td><?php echo h($estacao['Estacao']['id']); ?>&nbsp;</td>
		<td><?php echo h($estacao['Estacao']['nome']); ?>&nbsp;</td>
		<td><?php echo h($estacao['Estacao']['nome_arquivo']); ?>&nbsp;</td>
		<td><?php echo h($estacao['Estacao']['latitude']); ?>&nbsp;</td>
		<td><?php echo h($estacao['Estacao']['longitude']); ?>&nbsp;</td>
		<td><?php echo h($parsers[$estacao['Estacao']['tipo']]); ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View'), array('action' => 'view', 'pesquisador' => true, $estacao['Estacao']['id'])); ?>
			<?php
			if ($hasPermission['admin']) {
				echo $this->Html->link(__('Edit'), array('action' => 'edit', 'admin' => true, $estacao['Estacao']['id']));
				echo $this->Form->postLink(__('Delete'), array('action' => 'delete', 'admin' => true, $estacao['Estacao']['id']), null, __('Tem certeza que quer deletar a estação numero %s?', $estacao['Estacao']['id']));
			}
			?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>
	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>
<?php if ($hasPermission['admin']): ?>
	<div class="actions">
		<h3><?php echo __('Actions'); ?></h3>
		<ul>
			<li><?php echo $this->Html->link('Nova Estação', array('action' => 'add', 'admin' => true)); ?></li>
		</ul>
	</div>
<?php endif; ?>